<?php
// +----------------------------------------------------------------------
// | YUEGONGBAO [ WE CAN DO IT MORE SIMPLE ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2017 http://www.yuegongbaofund.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: 小夏 < 449134904@qq.com>
// +----------------------------------------------------------------------
namespace app\admin\controller;

use cmf\controller\AdminBaseController;
use dragon\AskModel;
use dragon\BuildModel;
use dragon\ContactModel;
use dragon\JoinModel;
use dragon\ProjectModel;

class PortalController extends AdminBaseController
{

    public function ask()
    {
        $model	= new AskModel();
		$list	= $model->paginate(15);
		$page 	= $list->render();

        $this->assign('keyword', isset($param['keyword']) ? $param['keyword'] : '');
        $this->assign('list', $list);
        $this->assign('config', [
		]);
        $this->assign('page', $page);

        return $this->fetch();
    }
    public function join()
    {
        $model	= new JoinModel();
		$list	= $model->paginate(15);
		$page 	= $list->render();

        $this->assign('keyword', isset($param['keyword']) ? $param['keyword'] : '');
        $this->assign('list', $list);
        $this->assign('config', [
			'sex'	=> JoinModel::$SEX,
			'level'	=> JoinModel::$LEVEL,
		]);
        $this->assign('page', $page);

        return $this->fetch();
    }
    public function build()
    {
        $model	= new BuildModel();
		$list	= $model->paginate(15);
		$page 	= $list->render();

        $this->assign('keyword', isset($param['keyword']) ? $param['keyword'] : '');
        $this->assign('list', $list);
        $this->assign('config', [
			'type'	=> BuildModel::$TYPE,
		]);
        $this->assign('page', $page);

        return $this->fetch();
    }
    public function contact()
    {
        $model	= new ContactModel();
		$list	= $model->paginate(15);
		$page 	= $list->render();

        $this->assign('keyword', isset($param['keyword']) ? $param['keyword'] : '');
        $this->assign('list', $list);
        $this->assign('config', [
		]);
        $this->assign('page', $page);

        return $this->fetch();
    }
    public function project()
    {
        $model	= new ProjectModel();
		$list	= $model->paginate(15);
		$page 	= $list->render();

        $this->assign('keyword', isset($param['keyword']) ? $param['keyword'] : '');
        $this->assign('list', $list);
        $this->assign('config', [
		]);
        $this->assign('page', $page);

        return $this->fetch();
    }


}
